import type { ComponentInternalInstance, VNode } from 'vue'

export interface IMessageProps {
  id?: string
  type?: 'info' | 'success' | 'warning' | 'error'
  message: string | VNode
  duration?: number
  showClose?: boolean
  offset?: number
  destory: () => void
}

export interface IMessageInstance {
  id: string
  props: IMessageProps
  vNode: VNode
  vm: ComponentInternalInstance
}

export type ICreateMessageProps = Omit<IMessageProps, 'destory' | 'vm'>
